package com.jopen.wia.cheese;

import java.util.Arrays;
import java.util.List;
import java.util.Collections;

import org.apache.wicket.Page;
import org.apache.wicket.Request;
import org.apache.wicket.Response;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebApplication;

public class CheeseApplication extends WebApplication {
	private List<Cheese> cheeses = Arrays.asList(
			new Cheese("Gouda", "Gouda is a yellowish Dutch[...]", 1.65),
			new Cheese("Bdam", "Bdam (Dutch Bdammer) is a D[...]", 1.05),
			new Cheese("Maasdam", "Maasdam cheese is a Dutch[...]", 2.35),
			new Cheese("Brie", "Brie is a soft cows' milk [...]", 3.65),
			new Cheese("Buxton Blue", "Buxton Blue cheese i[...]", 0.65),
			new Cheese("Parmesan", "Parmesan is a grana, a[...]", 1.95),
			new Cheese("Cheddar", "Cheddar cheese is a hard", 2.65),
			new Cheese("Roquefort", "Roquefort is a ewe's-m[...]", 1.67),
			new Cheese("Boursin", "Boursin cheese is a soft", 1.25),
			new Cheese("Camembert", "Camembert is a soft, c[...]", 2.95),
			new Cheese("Emmental", "Emmental is a yellow, c[...]", 1.95),
			new Cheese("Reblochon", "Reblochon is a French, c[...]", 2.05)
	);
	


	@Override
	public Class<? extends Page> getHomePage() {
		return IndexPage.class;
	}

	public List<Cheese> getCheeses() {
		return Collections.unmodifiableList(cheeses);
	}

	@Override
	public Session newSession(Request request, Response response) {
		return new CheeseSession(this, request);
	}
	
	
}
